home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 4 / Amiga Tools 4.iso / tools / internet-tools / connect-line / cl / devkit / c / include / gui.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-11-12  |  3.0 KB  |  179 lines

  1. /***********************************************************
  2.  *
  3.  * ConnectLine: Allgemeine GUI- und System-Includes (MUI)
  4.  *
  5.  * Verwalter: Michael Balzer
  6.  * 
  7.  * $RCSfile: GUI.h $
  8.  * $Revision: 1.1 $
  9.  * $Date: 1994/02/19 17:05:14 $
  10.  *
  11.  * $Author: balzer $
  12.  * $Locker: balzer $
  13.  * $State: Exp $
  14.  *
  15.  * $Log: GUI.h $
  16.  * Revision 1.1  1994/02/19  17:05:14  balzer
  17.  * Initial revision
  18.  *
  19.  */
  20.  
  21. #ifndef _CL_GUI_H
  22. #define _CL_GUI_H
  23.  
  24.  
  25. /*
  26.  * System
  27.  */
  28.  
  29. #include <exec/types.h>
  30. #include <exec/memory.h>
  31. #include <dos/dos.h>
  32. #include <dos/dostags.h>
  33. #include <graphics/gfxmacros.h>
  34. #include <workbench/workbench.h>
  35. #include <devices/timer.h>
  36. #include <libraries/locale.h>
  37. #include <libraries/mui.h>
  38.  
  39.  
  40. /*
  41.  * Prototypes
  42.  */
  43.  
  44. #include <clib/alib_protos.h>
  45. #include <proto/exec.h>
  46. #include <proto/dos.h>
  47. #include <proto/utility.h>
  48. #include <proto/graphics.h>
  49. #include <proto/intuition.h>
  50. #include <proto/gadtools.h>
  51. #include <proto/locale.h>
  52. #include <proto/icon.h>
  53. #include <proto/muimaster.h>
  54.  
  55.  
  56. /*
  57.  * ANSI C
  58.  */
  59.  
  60. #include <stdlib.h>
  61. #include <string.h>
  62. #include <stdio.h>
  63. #include <time.h>
  64. #include <dos.h>
  65.  
  66.  
  67. /*
  68.  * Compiler specific stuff
  69.  */
  70.  
  71. #define REG(x) register __ ## x
  72. #define ASM    __asm
  73. #define SAVEDS __saveds
  74.  
  75.  
  76. /*
  77.  * Prefs- und MUI-ID-Generator
  78.  */
  79.  
  80. #ifndef MAKE_ID
  81. #define MAKE_ID(a,b,c,d) ((ULONG) (a)<<24 | (ULONG) (b)<<16 | (ULONG) (c)<<8 | (ULONG) (d))
  82. #endif
  83.  
  84.  
  85. /*
  86.  * Lokalisierung
  87.  */
  88.  
  89. #define CATCOMP_NUMBERS
  90.  
  91. #ifdef __cplusplus
  92. extern "C"
  93. {
  94. #endif
  95.  
  96. STRPTR __asm GetString( register __a0 struct LocaleInfo *li, register __d0 LONG stringNum );
  97. extern struct LocaleInfo __cllocaleinfo;
  98.  
  99. #ifdef __cplusplus
  100. }
  101. #endif
  102.  
  103. #define GS(id) GetString( &__cllocaleinfo, id )
  104. #define MSG(x) GetString( &__cllocaleinfo, MSG_ ## x )
  105. #define KEY(x) *GetString( &__cllocaleinfo, MSG_ ## x ## _Key )
  106.  
  107.  
  108. /*
  109.  * Konstanten fuer MUIA_Disabled
  110.  */
  111.  
  112. #define DISABLED    TRUE
  113. #define ENABLED        FALSE
  114.  
  115.  
  116. /*
  117.  * Abkürzung zum Anlegen eines Hooks
  118.  */
  119.  
  120. #define HOOK( fn ) cl_allochook( (HOOKFUNC) fn, NULL )
  121.  
  122.  
  123. /*
  124.  * Makros für MUI_MakeObject
  125.  */
  126.  
  127. #define MkString( label, maxlen ) \
  128.     MUI_MakeObject( MUIO_String, label, maxlen )
  129.  
  130. #define MkCycle( label, entries ) \
  131.     MUI_MakeObject( MUIO_Cycle, label, entries )
  132.  
  133. #define MkCheckMark( label ) \
  134.     MUI_MakeObject( MUIO_Checkmark, label )
  135.  
  136.  
  137. /*
  138.  * Menu-Erzeugung
  139.  */
  140.  
  141. #define Menu( title ) \
  142.     MenuObject, \
  143.         MUIA_Menu_Title, title
  144.  
  145. #define MenuChild MUIA_Family_Child
  146.  
  147. #define MenuItem( title, shortcut, userdata ) \
  148.     MenuitemObject, \
  149.         MUIA_Menuitem_Title, title, \
  150.         MUIA_Menuitem_Shortcut, shortcut, \
  151.         MUIA_UserData, userdata, \
  152.         End
  153.  
  154. #define MenuToggleItem( title, shortcut, userdata, state ) \
  155.     MenuitemObject, \
  156.         MUIA_Menuitem_Title, title, \
  157.         MUIA_Menuitem_Shortcut, shortcut, \
  158.         MUIA_Menuitem_Toggle, TRUE, \
  159.         MUIA_Menuitem_Checkit, TRUE, \
  160.         MUIA_Menuitem_Checked, state, \
  161.         MUIA_UserData, userdata, \
  162.         End
  163.  
  164. #define MenuItemSeparator \
  165.     MenuitemObject, \
  166.         MUIA_Menuitem_Title, NM_BARLABEL, \
  167.         End
  168.  
  169.  
  170. /*
  171.  * andere nützliche Makros
  172.  */
  173.  
  174. #define export( obj, id ) \
  175.     set( obj, MUIA_ExportID, id );
  176.  
  177.  
  178. #endif
  179.